package top.tenebrous.yzl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.tenebrous.yzl.entity.JesticServer;
import top.tenebrous.yzl.mapper.JesticServerMapper;
import top.tenebrous.yzl.service.IAuthorityService;

/**
 * @author yazhang6
 */
@Slf4j
@Service
public class AuthorityServiceImpl implements IAuthorityService {

    @Autowired
    private JesticServerMapper jesticServerMapper;

    @Override
    public JesticServer queryServer(String serverId, String serverName) {
        return jesticServerMapper.selectOne(new LambdaQueryWrapper<JesticServer>()
                .eq(JesticServer::getServerSign, serverId)
                .eq(JesticServer::getServerName, serverName)
        );
    }
}
